import Vue from 'vue'
import Router from 'vue-router'
import store from '../store'

Vue.use(Router)

/* Layout */
import Layout from '../views/layout/Layout'
import Layout2 from "../views/layout/Layout2";

/**
 * hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
 *                                if not set alwaysShow, only more than one route under the children
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    title: 'title'               the name show in submenu and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar,
    component:resolve => require(['@/components/Banner2Info'],resolve),
  }
 **/
 const constantRouterMap = [
  {path: '/login', component:resolve => require(['@/views/login/index'],resolve), hidden: true},
  {path: '/forgetPassword', component:resolve => require(['@/views/login/forgetPassword'],resolve), hidden: true},
  {path: '/404', component: resolve => require(['@/views/404'],resolve), hidden: true},
  {path: '/invite', component: resolve => require(['@/views/invite'],resolve), hidden: true},
  {
    path: '',
    component: Layout,
    redirect: '/index',
    children: [{
      path: '/index',
      name: 'index',
      component: resolve => require(['@/views/home/index'],resolve),
      meta: {title: '工作台', icon: 'home'}
    },{
        path: '/upload',
        name: 'upload',
        component: resolve => require(['@/views/home/upload'],resolve),
        meta: {title: '图片上传', icon: 'order-return-reason',hidden: true},
        hidden:true
    }]
  },
  {
        path: '/check',
        component: Layout,
        redirect: '/sale/orderPayApplyCheck',
        meta: {title: '审批', icon: 'cashWith'},
        children: [
          {
           path: '/sale/orderPayApplyCheck',
           name: 'orderPayApplyCheck',
           component: resolve => require(['@/views/sale/orderPayApplyCheck'], resolve),
           meta: {title: '订单审批', icon: 'addgenjin'},
          },
          {
           path: '/sale/workflowCheck',
           name: 'workflowCheck',
           component: resolve => require(['@/views/sale/workflowCheck'], resolve),
           meta: {title: '流转审批', icon: 'addgenjin'},
          }
        ]
  },
  {  path: '/after',
     component: Layout,
     redirect: '/sale/afterSales',
     meta: {title: '客诉', icon: 'cashWith'},
     children: [ {
          path: '/sale/afterSales',
          name: 'afterSales',
          component: resolve => require(['@/views/sale/afterSales'], resolve),
          meta: {title: '销售客诉', icon: 'addgenjin',}
    },]

  },
  {
    path: "/data/saleDataStatistics",
    component: Layout,
    name: "saleDataStatistics",
    meta: { title: "销售数据看板", icon: "product-list" },
    children: [
      {
        path: "/data/saleDataStatistics",
        name: "saleDataStatistics",
        component: resolve =>require(["@/views/data/saleDataStatistics"], resolve),
        meta: { title: "销售数据看板", icon: "product-list" }
      },
      {
        path: "/data/userSaleNumAnalysis",
        name: "userSaleNumAnalysis",
        component: resolve =>require(["@/views/data/userSaleNumAnalysis"], resolve),
        meta: { title: "人员销量分析", icon: "product-list" }
      },
      {
        path: "/data/goodsSaleNumAnalysis",
        name: "goodsSaleNumAnalysis",
        component: resolve =>require(["@/views/data/goodsSaleNumAnalysis"], resolve),
        meta: { title: "产品销量分析", icon: "product-list" }
      },
      {
        path: "/data/customerSaleNumAnalysis",
        name: "customerSaleNumAnalysis",
        component: resolve =>require(["@/views/data/customerSaleNumAnalysis"], resolve),
        meta: { title: "客户销量分析", icon: "product-list" }
      },
      {
        path: '/report/profitAddSalesReport',
        name: 'profitAddSalesReport',
        component: resolve => require(['@/views/profitAddSalesReport'], resolve),
        meta: {title: '销售销量与目标', icon:'addgenjin',},
      },
    ]
  },
  {
      path: "/data/pumsDataStatistics",
      component: Layout,
      name: "pumsDataStatistics",
      meta: { title: "采购数据看板", icon: "product-list" },
      children: [
        {
          path: "/data/pumsDataStatistics",
          name: "pumsDataStatistics",
          component: resolve =>require(["@/views/data/pumsDataStatistics"], resolve),
          meta: { title: "采购数据看板", icon: "product-list" }
        },
        {
          path: "/data/pUserSaleNumAnalysis",
          name: "pUserSaleNumAnalysis",
          component: resolve =>require(["@/views/data/pUserSaleNumAnalysis"], resolve),
          meta: { title: "人员销量分析", icon: "product-list" }
        },
        {
          path: "/data/pGoodsSaleNumAnalysis",
          name: "pGoodsSaleNumAnalysis",
          component: resolve =>require(["@/views/data/pGoodsSaleNumAnalysis"], resolve),
          meta: { title: "产品销量分析", icon: "product-list" }
        },
        {
          path: "/data/pSupplierSaleNumAnalysis",
          name: "pSupplierSaleNumAnalysis",
          component: resolve =>require(["@/views/data/pSupplierSaleNumAnalysis"], resolve),
          meta: { title: "供应商销量分析", icon: "product-list" }
        },
      ]
    },
  {
    path: '/bms',
    component: Layout,
    redirect: '/bms/roles',
    name: 'bms',
    meta: {title: '系统', icon: 'shop'},
    children: [
      {
        path: '/bms/roles',
        name: 'roles',
        component: resolve => require(['@/views/bms/managementSetting'],resolve),
        meta: {title: '角色管理', icon: 'managementSetting'},
      },
      {
        path: '/bms/staffs',
        name: 'staffs',
        component: resolve => require(['@/views/bms/employeeSetting'],resolve),
        meta: {title: '员工管理', icon: 'employeeSetting'},
      },
      {
          path: '/pumsAddSale/setupManagement',
          name: 'setupManagement',
          component: resolve => require(['@/views/pumsAddSale/setupManagement'], resolve),
          meta: {title: '组织结构管理', icon:'product-list',},
        },
        {
            path: '/bms/setting',
            name: 'setting',
            component: resolve => require(['@/views/customerSetting'],resolve),
            meta: {title: '基本设置', icon: 'order-return-reason'},
        },
        {
            path: '/bms/files',
            name: 'files',
            component: resolve => require(['@/views/bms/files'],resolve),
            meta: {title: '文档管理', icon: 'order-return-reason'},
        },
        {
            path: '/bms/logList',
            name: 'logList',
            component: resolve => require(['@/views/bms/logList'],resolve),
            meta: {title: '操作日志', icon: 'order-return-reason'},
        },
        {
            path: '/bms/voteList',
            name: 'voteList',
            component: resolve => require(['@/views/bms/voteList'],resolve),
            meta: {title: '投票管理', icon: 'order-return-reason'},
        },
        {
            path: '/bms/votingTemplate',
            name: 'votingTemplate',
            component: resolve => require(['@/views/bms/votingTemplate'],resolve),
            meta: {title: '投票模板', icon: 'order-return-reason'},
        },
        {
            path: '/bms/goodsClassProfitSet',
            name: 'goodsClassProfitSet',
            component: resolve => require(['@/views/bms/goodsClassProfitSet'],resolve),
            meta: {title: '产品线管理', icon: 'order-return-reason'},
        },
        {
            path: '/bms/integral',
            name: 'integral',
            component: resolve => require(['@/views/bms/integral'],resolve),
            meta: {title: '积分管理', icon: 'order-return-reason'},
        },
         {
            path: '/bms/productClassification',
            name: 'productClassification',
            component: resolve => require(['@/views/bms/productClassification'],resolve),
            meta: {title: '厂家采购权限', icon: 'order-return-reason'},
        },
        {
            path: '/bms/productLabel',
            name: 'productLabel',
            component: resolve => require(['@/views/bms/productLabel'],resolve),
            meta: {title: '标签', icon: 'order-return-reason'},
        },
        {
            path: '/bms/customerLndustry',
            name: 'customerLndustry',
            component: resolve => require(['@/views/bms/customerLndustry'],resolve),
            meta: {title: '客户行业', icon: 'order-return-reason'},
        },
        {
            path: '/bms/goodsSetting',
            name: 'goodsSetting',
            component: resolve => require(['@/views/bms/goodsSetting'],resolve),
            meta: {title: '商品设置', icon: 'order-return-reason'},
        },
         {
            path: '/bms/messageSetting',
            name: 'messageSetting',
            component: resolve => require(['@/views/bms/messageSetting'],resolve),
            meta: {title: '消息管理', icon: 'order-return-reason'},
        },
        {
            path: '/bms/templateItem',
            name: 'templateItem',
            component: resolve => require(['@/views/bms/templateItem'],resolve),
            meta: {title: '模版项目', hidden: true},
            hidden:true
        },
        {
            path: '/bms/templateView',
            name: 'templateView',
            component: resolve => require(['@/views/bms/templateView'],resolve),
            meta: {title: '模版详情', hidden: true},
            hidden:true
        },
        {
            path: '/bms/activityInfo',
            name: 'activityInfo',
            component: resolve => require(['@/views/bms/activityInfo'],resolve),
            meta: {title: '投票活动详情', hidden: true},
            hidden:true
        },
        {
            path: '/bms/myActivity',
            name: 'myActivity',
            component: resolve => require(['@/views/bms/myActivity'],resolve),
            meta: {title: '我的评分', hidden: true},
            hidden:true
        },
        {
            path: '/bms/staffActivity',
            name: 'staffActivity',
            component: resolve => require(['@/views/bms/staffActivity'],resolve),
            meta: {title: '员工投票', hidden: true},
            hidden:true
        },
        {
            path: '/bms/filesDetail',
            name: 'filesDetail',
            component: resolve => require(['@/views/bms/filesDetail'],resolve),
            meta: {title: '文档列表', icon: 'order-return-reason',hidden: true},
            hidden:true
        },
        {
            path: '/bms/filesSee',
            name: 'filesSee',
            component: resolve => require(['@/views/bms/filesSee'],resolve),
            meta: {title: '文档详情', icon: 'order-return-reason',hidden: true},
            hidden:true
        },
    ]
  },
  {
    path: '/customers',
    component: Layout,
    redirect: '/statistics/statisticsCustomer',
    name: 'cms',
    meta: {title: '客户', icon: 'sms-ad'},
    children: [
      {
        path: '/statistics/statisticsCustomer',
        name: 'statisticsCustomer',
        component: resolve => require(['@/views/statistics/statisticsCustomer'], resolve),
        meta: {title: '客户统计', icon: 'addgenjin',}
      },
      {
        path: '/customers/home',
        name: 'customers',
        component: resolve => require(['@/views/cms/index'],resolve),
        meta: {title: '客户列表', icon: 'product-attr',yzPath:true},
      },
      {
        path: '/sale/customersPL',
        name: 'customersPL',
        component: resolve => require(['@/views/sale/customersPL'], resolve),
        meta: {title: '产品线客户', icon: 'addgenjin',}
      },
      {
        path: '/sale/allCustomersPL',
        name: 'allCustomersPL',
        component: resolve => require(['@/views/sale/allCustomersPL'], resolve),
        meta: {title: '全部客户产品线', icon: 'addgenjin',}
      },
      {
      path: '/sale/resourcesPL',
      name: 'resourcesPL',
      component: resolve => require(['@/views/sale/resourcesPL'], resolve),
      meta: {title: '共享池', icon: 'addgenjin',}
      },
      {
          path: '/sale/resourcesPL2',
          name: 'resourcesPL2',
          component: resolve => require(['@/views/sale/resourcesPL2'], resolve),
          meta: {title: '资源池', icon: 'addgenjin',}
      },
      {
        path: '/sale/followList',
        name: 'followList',
        component: resolve => require(['@/views/sale/followList'], resolve),
        meta: {title: '跟进记录新', icon: 'addgenjin',}
      },
      {
        path: '/sale/trialList',
        name: 'trialList',
        component: resolve => require(['@/views/sale/trialList'], resolve),
        meta: {title: '试用记录', icon: 'addgenjin',}
      },
      {
        path: '/customers/contacts',
        name: 'contacts',
        component: resolve => require(['@/views/Contacts'], resolve),
        meta: {title: '联系人', icon: 'user',yzPath:true},
      },
      {
        path: '/customers/material',
        name: 'material',
        component: resolve => require(['@/views/materialsUsed'], resolve),
        meta: {title: '使用材料', icon: 'sms-subject',yzPath:true},
      },
      {
        path: '/customers/kpiExport',
        name: 'kpiExport',
        component: resolve => require(['@/views/cms/kpiExport'], resolve),
        meta: {title: '报表导出', icon: 'product-attr'},
      },

      {
          path: '/customers/customerDetail',
          name: 'customerDetail',
          component: resolve => require(['@/views/cms/customerDetail'],resolve),
          meta: {title: '客户详情', icon: 'product-list',hidden: true},
          hidden:true
      },
      {
          path: '/customers/addCustomer',
          name: 'addCustomer',
          component: resolve => require(['@/views/cms/addCustomer'],resolve),
          meta: {title: '客户信息',hidden: true},
          hidden:true
      },
      {
          path: '/customers/addmaterial',
          name: 'addmaterial',
          component: resolve => require(['@/views/addmaterial'], resolve),
          meta: {title: '新增使用材料',hidden: true},
          hidden:true
      },
      {
          path: '/customers/setWeiChengJiao',
          name: 'setWeiChengJiao',
          component: resolve => require(['@/views/cms/setWeiChengJiao'], resolve),
          meta: {title: '设置未成交原因及对策',hidden: true},
          hidden:true
      },
      {
          path: '/sale/addCustomerPL',
          name: 'addCustomerPL',
          component: resolve => require(['@/views/sale/addCustomerPL'], resolve),
          meta: {title: '新增客户', hidden: true},
          hidden: true
      },
      {
          path: '/sale/customerGoodsLineInfo',
          name: 'customerGoodsLineInfo',
          component: resolve => require(['@/views/sale/customerGoodsLineInfo'], resolve),
          meta: {title: '产品线详情', hidden: true},
          hidden: true
      }
    ]
   },
   {
      path: '/fms',
      component: Layout,
      redirect: '/fms/myCustomForFollow',
      meta: {title: '销售跟进', icon: 'cashWith'},
      children: [
         {
          path: '/fms/myCustomForFollow',
          name: 'myCustomForFollow',
          component: resolve => require(['@/views/fms/myCustomForFollow'], resolve),
          meta: {title: '我的客户', icon:'product-list',},
          },
         {
          path: '/fms/departmentCustomTab',
          name: 'departmentCustomTab',
          component: resolve => require(['@/views/fms/departmentCustomTab'], resolve),
          meta: {title: '部门客户', icon:'product-list',},
         },
         {
          path: '/fms/allCustomForFollow',
          name: 'allCustomForFollow',
          component: resolve => require(['@/views/fms/allCustomForFollow'], resolve),
          meta: {title: '全部客户', icon:'product-list',},
         },
         {
           path: '/fms/customerDepth',
           name: 'customerDepth',
           component: resolve => require(['@/views/fms/customerDepth'], resolve),
           meta: {title: '客户深度分析', icon:'product-list',},
          },
         {
           path: "/data/customerMoveList",
           name: "customerMoveList",
           component: resolve =>require(["@/views/data/customerMoveList"], resolve),
           meta: { title: "流转客户", icon: "product-list" }
         },
         {
           path: '/fms/customerBlackList',
           name: 'customerBlackList',
           component: resolve => require(['@/views/fms/customerBlackList'], resolve),
           meta: {title: '客户黑名单', icon:'product-list',},
          },
          {
            path: '/sale/manageFmsList',
            name: 'manageFmsList',
            component: resolve => require(['@/views/sale/manageFmsList'], resolve),
            meta: {title: '管理跟进详情',icon: 'product-list', },
        },
         {
           path: '/fms/followDetailsList',
           name: 'followDetailsList',
           component: resolve => require(['@/views/fms/followDetailsList'], resolve),
           meta: {title: '跟进详情', icon:'product-list',},
         },
         {
            path: '/fms/phoneOutboundList',
            name: 'phoneOutboundList',
            component: resolve => require(['@/views/fms/phoneOutboundList'], resolve),
            meta: {title: '电话外呼', icon:'product-list',},
         },
         {
          path: '/fms/followUpReport',
          name: 'followUpReport',
          component: resolve => require(['@/views/fms/followUpReport'], resolve),
          meta: {title: '跟进报表', icon:'product-list',},
         },
         {
          path: '/fms/followSetting',
          name: 'followSetting',
          component: resolve => require(['@/views/fms/followSetting'], resolve),
          meta: {title: '跟进设置', icon:'product-list',},
         },
         {
           path: '/fms/callReport',
           name: 'callReport',
           component: resolve => require(['@/views/fms/callReport'], resolve),
           meta: {title: '外呼数据报表', icon:'product-list',},
         },
         {
          path: '/statistics/buyNumber',
          name: 'newBuyNumber',
          component: resolve => require(['@/views/statistics/buyNumber'], resolve),
          meta: {title: '客户购买数量', icon: 'addgenjin',}
        },
        {
          path: '/statistics/profitRanking',
          name: 'newProfitRanking',
          component: resolve => require(['@/views/statistics/profitRanking'], resolve),
          meta: {title: '客户吨毛利排行', icon: 'addgenjin',}
        },
        {
          path: '/statistics/buyFrequency',
          name: 'newBuyFrequency',
          component: resolve => require(['@/views/statistics/buyFrequency'], resolve),
          meta: {title: '客户购买频率', icon: 'addgenjin',}
        },
        {
          path: '/fms/saleWorkOrder',
          name: 'saleWorkOrder',
          component: resolve => require(['@/views/fms/saleWorkOrder'], resolve),
          meta: {title: '销售工单', icon: 'addgenjin',}
        },
      ]
   },
    {
    path: "/allInLineSale",
    component: Layout,
    name: "allInLineSale",
    meta: { title: "全流程询报价", icon: "sms-subject" },
    children: [
      {
        path: "/allInLineSale/inquiryPrice/:type",
        name: "inquiryPrice",
        component: resolve => require(["@/views/allInLine/allInLineSale/inquiryPrice"], resolve),
        meta: { title: "询价", icon: "inquiryPrice" }
      },
      {
        path: "/allInLineSale/onePrice/:type",
        name: "onePrice",
        component: resolve => require(["@/views/allInLine/allInLineSale/onePrice"], resolve),
        meta: { title: "一口价", icon: "total-today" }
      },
      {
        path: "/allInLineSale/allInLineOrderList/:type",
        name: "allInLineOrderList",
        component: resolve => require(["@/views/allInLine/allInLineSale/allInLineOrderList"], resolve),
        meta: { title: "销售订单", icon: "addgenjin" }
      },
      {
        path: "/allInLineSale/purchaseOffer/:type",
        name: "purchaseOffer",
        component: resolve => require(["@/views/allInLine/pums/purchaseOffer"], resolve),
        meta: { title: "采购报价", icon: "product-comment" }
      },
      {
        path: "/allInLineSale/freightOffer/:type",
        name: "freightOffer",
        component: resolve =>require(["@/views/allInLine/logistics/freightOffer"], resolve),
        meta: { title: "运费报价", icon: "logistics" }
      },
      {
        path: "/allInLineSale/moresuPriceService/:type",
        name: "moresuPriceService",
        component: resolve =>require(["@/views/allInLine/moresuPrice/moresuPriceService"], resolve),
        meta: { title: "摩塑网价格维护", icon: "total-week" }
      },
      {
        path: "/allInLineSale/competitive",
        name: "competitive",
        component: resolve =>require(["@/views/allInLine/competitive"], resolve),
        meta: { title: "竞争力与推荐值", icon: "total-week" }
      },
      {
        path: "/allInLineSale/myInquirySupplierPrice",
        name: "myInquirySupplierPrice",
        component: resolve =>require(["@/views/allInLine/myInquirySupplierPrice"], resolve),
        meta: { title: "供应商报价", icon: "total-week" }
      },
      {
        path: "/allInLineSale/linePriceList",
        name: "linePriceList",
        component: resolve =>require(["@/views/allInLine/linePriceList"], resolve),
        meta: { title: "物流线路价格表", icon: "total-week" }
      },
      {
        path: "/allLineReport/customerTypeOrderList",
        name: "customerTypeOrderList",
        component: resolve =>
        require(["@/views/allInLine/report/customerTypeOrderList"], resolve),
        meta: { title: "订单分类核实", icon: "product-list" }
      },
      {
        path: "/allInLineSale/offerTemplate/:type",
        name: "offerTemplate",
        component: resolve => require(["@/views/allInLine/pums/offerTemplate"], resolve),
        meta: { title: "报价模板", icon: "product-list" },
        hidden: true
      },
      {
        path: "/allInLineSale/agreementDetails/:type",
        name: "agreementDetails",
        component: resolve =>require(["@/views/allInLine/allInLineSale/agreementDetails"], resolve),
        meta: { title: "销售合同明细", icon: "product-attr" },
        hidden: true
      },
      {
        path: "/allInLineSale/approvel/:type",
        name: "approvel",
        component: resolve => require(["@/views/allInLine/allInLineSale/approvel"], resolve),
        meta: { title: "审批", icon: "product-attr" },
        hidden: true
      },
      {
        path: "/allInLineSale/allInLineOrderDetail/:type",
        name: "allInLineOrderDetail",
        component: resolve => require(["@/views/allInLine/allInLineSale/allInLineOrderDetail"], resolve),
        meta: { title: "合同详情", icon: "product-attr", hidden: true },
        hidden: true
      },
      // {
      //   path: "/allInLineSale/allInLinePrinting",
      //   name: "allInLinePrinting",
      //   component: resolve => require(["@/views/allInLine/allInLineSale/allInLinePrinting"], resolve),
      //   meta: { title: "合同模板", hidden: true },
      //   hidden: true
      // }
    ]
  },
  {
      path: '/pumsAddSale',
      component: Layout,
      redirect: '/pumsAddSale/cargoManagement',
      meta: {title: '采销融合', icon: 'cashWith'},
      children: [
        {
          path: '/pumsAddSale/cargoManagement',
          name: 'cargoManagement',
          component: resolve => require(['@/views/pumsAddSale/cargoManagement'], resolve),
          meta: {title: '内部货权管理', icon:'product-list',},
        },
        {
          path: '/pumsAddSale/profitSettlement',
          name: 'profitSettlement',
          component: resolve => require(['@/views/pumsAddSale/profitSettlement'], resolve),
          meta: {title: '毛利结算', icon:'product-list',},
        },
        {
          path: '/pumsAddSale/profitSettlementSum',
          name: 'profitSettlementSum',
          component: resolve => require(['@/views/pumsAddSale/profitSettlementSum'], resolve),
          meta: {title: '采销毛利汇总', icon:'product-list',},
        },

        {
          path: '/pumsAddSale/transferRecordReport',
          name: 'transferRecordReport',
          component: resolve => require(['@/views/pumsAddSale/transferRecordReport'], resolve),
          meta: {title: '货权转移记录', icon:'product-list',},
        }
      ]
    },
    {
        path: '/sale',
        component: Layout,
        redirect: '/sale/home',
        meta: {title: '销售', icon: 'cashWith'},
        children: [
          {
            path: '/sale/home',
            name: 'sale',
            component: resolve => require(['@/views/sale/index'], resolve),
            meta: {title: '销售合同列表', icon:'product-list',},
          },
          {
            path: '/sale/saleContractDetails',
            name: 'saleContractDetails',
            component: resolve => require(['@/views/sale/saleContractDetails'], resolve),
            meta: {title: '销售合同明细', icon:'product-list',},
          },
          {
            path: '/sale/orderClosed',
            name: 'orderClosed',
            component: resolve => require(['@/views/sale/orderClosed'], resolve),
            meta: {title: '订单关闭列表', icon:'product-list',},
          },
          {
            path: '/sale/saleDeliverConfirm',
            name: 'saleDeliverConfirm',
            component: resolve => require(['@/views/sale/saleDeliverConfirm'], resolve),
            meta: {title: '收货确认', icon:'product-list',},
          },
          {
            path: '/sale/saleDeliverFeedback',
            name: 'saleDeliverFeedback',
            component: resolve => require(['@/views/sale/saleDeliverFeedback'], resolve),
            meta: {title: '发货延迟反馈', icon:'product-list',},
          },
          {
            path: '/sale/saleDeliverData',
            name: 'saleDeliverData',
            component: resolve => require(['@/views/sale/saleDeliverData'], resolve),
            meta: {title: '销售发货单', icon:'product-list',},
          },
          {
            path: '/sale/saleDeliver',
            name: 'saleDeliver',
            component: resolve => require(['@/views/sale/saleDeliver'], resolve),
            meta: {title: '发货单', icon:'product-list',},
          },
          {
            path: '/sale/saleDeliverDetails',
            name: 'saleDeliverDetails',
            component: resolve => require(['@/views/sale/saleDeliverDetails'], resolve),
            meta: {title: '发货明细', icon:'product-list',},
          },
          {
            path: '/sale/saleDeliverInvoiceUrgency',
            name: 'saleDeliverInvoiceUrgency',
            component: resolve => require(['@/views/sale/saleDeliverInvoiceUrgency'], resolve),
            meta: {title: '发货开票缓急表', icon:'product-list',},
          },
          {
            path: '/sale/saleInvoice',
            name: 'saleInvoice',
            component: resolve => require(['@/views/sale/saleInvoice'], resolve),
            meta: {title: '销售发票', icon:'product-list',},
          },
          {
            path: '/sale/confirmationLetterNew',
            name: 'confirmationLetterNew',
            component: resolve => require(['@/views/sale/confirmationLetterNew'], resolve),
            meta: {title: '收货确认函新', icon:'product-list',},
          },
          {
            path: '/sale/contractSearch',
            name: 'contractSearch',
            component: resolve => require(['@/views/sale/contractSearch'], resolve),
            meta: {title: '合同查询', icon:'search',},
          },
          {
            path: '/sale/saleImplement',
            name: 'saleImplement',
            component: resolve => require(['@/views/sale/saleImplement'], resolve),
            meta: {title: '销售订单执行表', icon:'search',},
          },
          {
            path: '/sale/workPlan',
            name: 'workPlan',
            component: resolve => require(['@/views/sale/workPlan'], resolve),
            meta: {title: '工作计划', icon:'product-list',},
          },
          {
            path: '/sale/inventoryQuery',
            name: 'inventoryQuery',
            component: resolve => require(['@/views/sale/inventoryQuery'], resolve),
            meta: {title: '库存查询', icon:'search',},
          },
          {
            path: '/sale/recommender',
            name: 'recommender',
            component: resolve => require(['@/views/sale/recommender'], resolve),
            meta: {title: '推荐人管理', icon:'product-list',},
          },
          {
            path: '/sale/saleContract',
            name: 'saleContract',
            component: resolve => require(['@/views/sale/saleContract'], resolve),
            meta: {title: '采购合同明细', icon:'product-list',},
          },
          {
            path: '/sale/buyFrequency',
            name: 'buyFrequency',
            component: resolve => require(['@/views/sale/buyFrequency'], resolve),
            meta: {title: '购买频率', icon:'product-list',},
          },
          {
            path: '/sale/querySaleGoodsStock ',
            name: 'querySaleGoodsStock',
            component: resolve => require(['@/views/sale/querySaleGoodsStock'], resolve),
            meta: {title: '实时库存', icon:'product-list',},
          },
          {
            path: '/sale/confirmationLetter',
            name: 'confirmationLetter',
            component: resolve => require(['@/views/sale/confirmationLetter'], resolve),
            meta: {title: '收货确认函', icon:'product-list',},
          },
          {
          path: '/sale/productLibrary',
          name: 'productLibrary',
          component: resolve => require(['@/views/sale/productLibrary'], resolve),
          meta: {title: '产品资料库', icon:'product-list',},
          },
          {
            path: '/sale/saleDayStock',
            name: 'saleDayStock',
            component: resolve => require(['@/views/sale/saleDayStock'], resolve),
            meta: {title: '日库存', icon: 'addgenjin',}
          },
          {
            path: '/sale/targetAdministration',
            name: 'targetAdministration',
            component: resolve => require(['@/views/sale/targetAdministration'], resolve),
            meta: {title: '目标管理', icon: 'addgenjin',}
          },
          {
            path: '/sale/addressList',
            name: 'addressList',
            component: resolve => require(['@/views/sale/addressList'], resolve),
            meta: {title: '对接地址', icon: 'addgenjin',}
          },
          {
            path: '/sale/growthAnalysis',
            name: 'growthAnalysis',
            component: resolve => require(['@/views/sale/growthAnalysis'], resolve),
            meta: {title: '成长分析表', icon: 'addgenjin',}
          },
          {
            path: '/sale/monthTargetSale',
            name: 'monthTargetSale',
            component: resolve => require(['@/views/sale/monthTargetSale'], resolve),
            meta: {title: '月目标', icon: 'addgenjin',}
          },
          {
            path: '/sale/customerReceivables',
            name: 'customerReceivables',
            component: resolve => require(['@/views/sale/customerReceivables'], resolve),
            meta: {title: '客户应收款', icon: 'addgenjin',}
          },
          {
              path: '/sale/saleConsultationList',
              name: 'saleConsultationList',
              component: resolve => require(['@/views/sale/saleConsultationList'], resolve),
              meta: {title: '杂费(装卸费)管理',icon: 'product-list', },
          },
           {
              path: '/sale/priceOffCancelList',
              name: 'priceOffCancelList',
              component: resolve => require(['@/views/sale/priceOffCancelList'], resolve),
              meta: {title: '降价违约回访',icon: 'product-list', },
          },
          {
            path: '/sale/saleContractDetail',
            name: 'saleContractDetail',
            component: resolve => require(['@/views/sale/saleContractDetail'], resolve),
            meta: {title: '采购合同详情',  hidden: true},
            hidden: true
          },
          {
            path: '/sale/saleDetail',
            name: 'saleDetail',
            component: resolve => require(['@/views/sale/orderDetail'], resolve),
            meta: {title: '订单详情', hidden: true},
            hidden: true
          },
          {
            path: '/sale/printing',
            name: 'printing',
            component: resolve => require(['@/views/sale/printing'], resolve),
            meta: {title: '合同模板', hidden: true},
            hidden: true
          },
          {
            path: '/sale/printingTx',
            name: 'printingTx',
            component: resolve => require(['@/views/sale/printing-tx'], resolve),
            meta: {title: '合同模板', hidden: true},
            hidden: true
          },
          {
            path: '/sale/printingRc',
            name: 'printingRc',
            component: resolve => require(['@/views/sale/printing-rc'], resolve),
            meta: {title: '合同模板', hidden: true},
            hidden: true
          },
          {
           path: '/sale/printingXs',
           name: 'printingXs',
           component: resolve => require(['@/views/sale/printing-xs'], resolve),
           meta: {title: '合同模板', hidden: true},
           hidden: true
          },
          {
            path: '/sale/printLetter',
            name: 'printLetter',
            component: resolve => require(['@/views/sale/printLetter'], resolve),
            meta: {title: '打印确认函', hidden: true},
            hidden: true
          }
        ]
    },
    {
        path: '/purchase',
        component: Layout,
        redirect: '/purchase/home',
        meta: {title: '采购', icon: 'purchase'},
        children: [
          {
            path: '/purchase/home',
            name: 'purchase',
            component: resolve => require(['@/views/pums/index'], resolve),
            meta: {title: '销售合同列表',icon:'product-list',},
          },
          {
            path: '/purchase/purchaseContractDetails',
            name: 'purchaseContractDetails',
            component: resolve => require(['@/views/pums/purchaseContractDetails'], resolve),
            meta: {title: '销售合同明细', icon:'product-list',},
          },
          {
            path: '/purchase/purchaseDeliverDetails',
            name: 'purchaseDeliverDetails',
            component: resolve => require(['@/views/pums/purchaseDeliverDetails'], resolve),
            meta: {title: '发货明细', icon:'product-list',},
          },
          {
            path: '/purchase/purchaseScheduling',
            name: 'purchaseScheduling',
            component: resolve => require(['@/views/pums/purchaseScheduling'], resolve),
            meta: {title: '发货排期', icon:'product-list',},
          },
          {
            path: '/purchase/purchaseContract',
            name: 'purchaseContract',
            component: resolve => require(['@/views/pums/purchaseContract'], resolve),
            meta: {title: '采购合同', icon:'product-list',},
          },
          {
            path: '/purchase/contractDetailed',
            name: 'contractDetailed',
            component: resolve => require(['@/views/pums/contractDetailed'], resolve),
            meta: {title: '采购合同明细', icon:'product-list',},
          },
          {
            path: '/purchase/purchaseApplyPay',
            name: 'purchaseApplyPay',
            component: resolve => require(['@/views/pums/purchaseApplyPay'], resolve),
            meta: {title: '采购付款申请', icon:'product-list',},
          },
          {
            path: '/purchase/purchaseAfterSettlement',
            name: 'purchaseAfterSettlement',
            component: resolve => require(['@/views/pums/purchaseAfterSettlement'], resolve),
            meta: {title: '采购后结算申请', icon:'product-list',},
          },
          {
            path: '/purchase/dischargeGoods',
            name: 'dischargeGoods',
            component: resolve => require(['@/views/pums/dischargeGoods'], resolve),
            meta: {title: '采购排货', icon:'product-list',},
          },
          {
            path: '/purchase/supplier',
            name: 'supplier',
            component: resolve => require(['@/views/pums/supplier'], resolve),
            meta: {title: '供应商管理', icon:'product-list',},
          },
          {
            path: '/purchase/supplierContact',
            name: 'supplierContact',
            component: resolve => require(['@/views/pums/supplierContact'], resolve),
            meta: {title: '供应商联系人', icon:'product-list',},
          },
          {
            path: '/purchase/supplierMaterials',
            name: 'supplierMaterials',
            component: resolve => require(['@/views/pums/supplierMaterials'], resolve),
            meta: {title: '供应商材料', icon:'product-list',},
          },
          {
            path: '/purchase/supplierInquiry',
            name: 'supplierInquiry',
            component: resolve => require(['@/views/pums/supplierInquiry'], resolve),
            meta: {title: '供应商询价记录', icon:'product-list',},
          },
          {
            path: '/purchase/inquiryReport',
            name: 'inquiryReport',
            component: resolve => require(['@/views/pums/inquiryReport'], resolve),
            meta: {title: '询价记录报表', icon:'addgenjin',},
          },
          {
            path: '/purchase/mallOrders',
            name: 'mallOrders',
            component: resolve => require(['@/views/pums/mallOrders'], resolve),
            meta: {title: '商城订单登记', icon:'addgenjin',},
          },
          {
            path: '/purchase/addSupplier',
            name: 'addSupplier',
            component: resolve => require(['@/views/pums/addSupplier'], resolve),
            meta: {title: '供应商信息', hidden: true},
            hidden: true
          },
          {
            path: '/purchase/myPurchaseTrackingList',
            name: 'myPurchaseTrackingList',
            component: resolve => require(['@/views/pums/myPurchaseTrackingList'], resolve),
            meta: {
              title: '我的跟进列表',
              icon: 'product-list',
              yzPath: true // 添加这个属性表示不受权限控制
            },
          },
          {
            path: '/purchase/allPurchaseTrackingList',
            name: 'purchaseTrackingList',
            component: resolve => require(['@/views/pums/allPurchaseTrackingList'], resolve),
            meta: {title: '全部跟进列表', icon: 'product-list',},
          },
          {
            path: '/purchase/purchaseTrackingDetail',
            name: 'purchaseTrackingDetail',
            component: resolve => require(['@/views/pums/purchaseTrackingDetail'], resolve),
            meta: {
              title: '跟进记录',
              icon: 'product-list',
              yzPath: true // 添加这个属性表示不受权限控制
            },
          },
          {
            path: '/purchase/supplierFollowUpReport',
            name: 'supplierFollowUpReport',
            component: resolve => require(['@/views/pums/supplierFollowUpReport'], resolve),
            meta: {title: '跟进报表', icon: 'product-list',},
          },
          {
            path: '/purchase/quotationsAnalysis',
            name: 'quotationsAnalysis',
            component: resolve => require(['@/views/pums/quotationsAnalysis'], resolve),
            meta: {title: '行情分析', icon: 'product-list',},
          },
          {
            path: '/purchase/purchaseReceipt',
            name: 'purchaseReceipt',
            component: resolve => require(['@/views/pums/purchaseReceipt'], resolve),
            meta: {title: '采购收票', icon: 'product-list',},
          },
          {
            path: '/purchase/purchaseKPI',
            name: 'purchaseKPI',
            component: resolve => require(['@/views/pums/purchaseKPI'], resolve),
            meta: {title: '采购毛利评分', icon: 'product-list',},
          },
          {
            path: '/purchase/purchaseOEM',
            name: 'purchaseOEM',
            component: resolve => require(['@/views/pums/purchaseOEM'], resolve),
            meta: {title: '代加工', icon: 'product-list',},
          },
          {
              path: '/purchase/purchaseSchedulingNew',
              name: 'purchaseSchedulingNew',
              component: resolve => require(['@/views/pums/purchaseSchedulingNew'], resolve),
              meta: {title: '排货管理', icon:'product-list',},
          },
          {
              path: '/purchase/purchaseTarget',
              name: 'purchaseTarget',
              component: resolve => require(['@/views/pums/purchaseTarget'], resolve),
              meta: {title: '目标管理', icon:'product-list',},
          },
          {
              path: '/purchase/warehousePriceReport',
              name: 'warehousePriceReport',
              component: resolve => require(['@/views/pums/warehousePriceReport'], resolve),
              meta: {title: '品类仓位报表', icon:'product-list',},
          },
          {
              path: '/purchase/sckChange',
              name: 'stockChange',
              component: resolve => require(['@/views/pums/stockChange'], resolve),
              meta: {title: '库位报表', icon:'product-list',},
          },
          {
              path: '/purchase/procurementMarket',
              name: 'procurementMarket',
              component: resolve => require(['@/views/pums/procurementMarket'], resolve),
              meta: {title: '采购行情', icon:'product-list',},
          },
          {
              path: '/purchase/purchaseDetail',
              name: 'purchaseDetail',
              component: resolve => require(['@/views/pums/orderDetail'], resolve),
              meta: {title: '订单详情', hidden: true},
              hidden: true
          },
          {
              path: '/purchase/txPurchaseDetail',
              name: 'txPurchaseDetail',
              component: resolve => require(['@/views/pums/txOrderDetail'], resolve),
              meta: {title: '桐鑫订单详情', hidden: true},
              hidden: true
          },
          {
              path: '/purchase/rcPurchaseDetail',
              name: 'rcPurchaseDetail',
              component: resolve => require(['@/views/pums/rcOrderDetail'], resolve),
              meta: {title: '日程订单详情', hidden: true},
              hidden: true
          },
          {
              path: '/purchase/supplierInfo',
              name: 'supplierInfo',
              component: resolve => require(['@/views/pums/supplierInfo'], resolve),
              meta: {title: '供应商信息', hidden: true},
              hidden: true
          },
          {
              path: '/purchase/inquiryInfo',
              name: 'inquiryInfo',
              component: resolve => require(['@/views/pums/inquiryInfo'], resolve),
              meta: {title: '询价记录', hidden: true},
              hidden: true
          },
          {
              path: '/purchase/SupplierInquiryInfo',
              name: 'SupplierInquiryInfo',
              component: resolve => require(['@/views/pums/SupplierInquiryInfo'], resolve),
              meta: {title: '询价记录', hidden: true},
              hidden: true
          },
          {
              path: '/purchase/purchaseContractDetail',
              name: 'purchaseContractDetail',
              component: resolve => require(['@/views/pums/purchaseContractDetail'], resolve),
              meta: {title: '采购合同详情', hidden: true},
              hidden: true
          },
          {
              path: '/purchase/purchasePrinting',
              name: 'purchasePrinting',
              component: resolve => require(['@/views/pums/printing'], resolve),
              meta: {title: '采购合同打印', hidden: true},
              hidden: true
          },
        {
            path: '/purchase/purchaseApplyPayInfo',
            name: 'purchaseApplyPayInfo',
            component: resolve => require(['@/views/pums/purchaseApplyPayInfo'], resolve),
            meta: {title: '申请付款单详情', hidden: true},
            hidden: true
        },
        {
            path: '/purchase/purchasePayOEMInfo',
            name: 'purchasePayOEMInfo',
            component: resolve => require(['@/views/pums/purchasePayOEMInfo'], resolve),
            meta: {title: '付款详情', hidden: true},
            hidden: true
        },
        {
          path: '/purchase/purchaseOEMInfo',
          name: 'purchaseOEMInfo',
          component: resolve => require(['@/views/pums/purchaseOEMInfo'], resolve),
          meta: { title: '代加工详情', hidden: true },
          hidden: true
        },
        {
          path: '/purchase/purchaseTargetFinished',
          name: 'purchaseTargetFinished',
          component: resolve => require(['@/views/pums/purchaseTargetFinished'], resolve),
          meta: {title: '采购目标', icon:'product-list',},
        },
        {
          path: '/purchase/purchasePhoneOutboundList',
          name: 'purchasePhoneOutboundList',
          component: resolve => require(['@/views/pums/purchasePhoneOutboundList'], resolve),
          meta: {title: '电话外呼', icon:'product-list',},
        },
        {
          path: '/purchase/purchaseCallReport',
          name: 'purchaseCallReport',
          component: resolve => require(['@/views/pums/purchaseCallReport'], resolve),
          meta: {title: '外呼数据报表', icon:'product-list',},
        },
        {
          path: '/purchase/purchaseOrderExecution',
          name: 'purchaseOrderExecution',
          component: resolve => require(['@/views/pums/purchaseOrderExecution'], resolve),
          meta: {title: '采购订单执行表', icon:'product-list',},
        },
        {
          path: '/purchase/addPurchaseOrder',
          name: 'addPurchaseOrder',
          component: resolve => require(['@/views/pums/addPurchaseOrder'], resolve),
          meta: { title: '新增采购订单', hidden: true },
          hidden: true
        },
      ]
    },
    {
        path: '/deliver',
        component: Layout,
        redirect: '/deliver/home',
        meta: {title: '仓库', icon: 'deliver'},
        children: [
        {
            path: '/deliver/deliverOrderList',
            name: 'deliverOrderList',
            component: resolve => require(['@/views/deliver/orderList'], resolve),
            meta: {title: '销售合同列表', icon: 'product-list',},
        },
        {
            path: '/deliver/home',
            name: 'deliver',
            component: resolve => require(['@/views/deliver/index'], resolve),
            meta: {title: '发货单', icon: 'product-list',},
        },
        {
            path: '/deliver/deliverDetails',
            name: 'deliverDetails',
            component: resolve => require(['@/views/deliver/deliverDetails'], resolve),
            meta: {title: '发货单明细', icon: 'product-list',},
        },
        {
            path: '/deliver/inWarehouse',
            name: 'inWarehouse',
            component: resolve => require(['@/views/deliver/inWarehouse'], resolve),
            meta: {title: '运费不含送货单', icon:'product-list',},
        },
        {
            path: '/deliver/driverList',
            name: 'driverList',
            component: resolve => require(['@/views/deliver/driverList'], resolve),
            meta: {title: '司机管理', icon: 'product-list'},
        },
        {
                path: '/deliver/dischargingGoods',
                name: 'dischargingGoods',
                component: resolve => require(['@/views/deliver/dischargingGoods'], resolve),
                meta: {title: '排货列表', icon: 'product-list'},
        },
        {
            path: '/deliver/purchasePickUp',
            name: 'purchasePickUp',
            component: resolve => require(['@/views/deliver/purchasePickUp'], resolve),
            meta: {title: '采购提货', icon: 'product-list'},
        },
        {
            path: '/deliver/pickUpList',
            name: 'pickUpList',
            component: resolve => require(['@/views/deliver/pickUpList'], resolve),
            meta: {title: '供应商提货', icon: 'product-list'},
        },
        {
            path: '/deliver/deliverFreightSettlement',
            name: 'deliverFreightSettlement',
            component: resolve => require(['@/views/deliver/freightSettlement'], resolve),
            meta: {title: '运费结算',icon: 'product-list', },
        },
        {
            path: '/deliver/inventoryWarning',
            name: 'inventoryWarning',
            component: resolve => require(['@/views/deliver/inventoryWarning'], resolve),
            meta: {title: '库存预警',icon: 'product-list', },
        },
        {
          path: '/deliver/sourceList',
          name: 'sourceList',
          component: resolve => require(['@/views/deliver/sourceList'], resolve),
          meta: {title: '货源列表',icon: 'product-list', },
        },
        {
          path: '/deliver/ymmOrderList',
          name: 'ymmOrderList',
          component: resolve => require(['@/views/deliver/ymmOrderList'], resolve),
          meta: {title: '运满满订单列表',icon: 'product-list', },
        },
        {
            path: '/deliver/dischargingGoods2',
            name: 'dischargingGoods2',
            component: resolve => require(['@/views/deliver/dischargingGoods2'], resolve),
            meta: {title: '排货列表新', icon: 'product-list'},
        },
        {
            path: '/deliver/logisticsSummaryAnalysis',
            name: 'logisticsSummaryAnalysis',
            component: resolve => require(['@/views/deliver/logisticsSummaryAnalysis'], resolve),
            meta: {title: '物流汇总分析', icon: 'product-list'},
        },
        {
          path: '/deliver/ymmOrderInfo',
          name: 'ymmOrderInfo',
          component: resolve => require(['@/views/deliver/ymmOrderInfo'], resolve),
          meta: {title: '运满满订单详情',hidden: true },
          hidden: true
        },
        {
            path: '/deliver/deliverCon',
            name: 'deliverCon',
            component: resolve => require(['@/views/deliver/orderDetail'], resolve),
            meta: {title: '发货单详情', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/inWarehouseDetail',
            name: 'inWarehouseDetail',
            component: resolve => require(['@/views/deliver/inWarehouseDetail'], resolve),
            meta: {title: '单据详情', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/otherInWarehouseDetail',
            name: 'otherInWarehouseDetail',
            component: resolve => require(['@/views/deliver/otherInWarehouseDetail'], resolve),
            meta: {title: '其它入库单', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/deliverAddSettlement',
            name: 'deliverAddSettlement',
            component: resolve => require(['@/views/deliver/addSettlement'], resolve),
            meta: {title: '新增结算单', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/deliverSettlementInfo',
            name: 'deliverSettlementInfo',
            component: resolve => require(['@/views/deliver/settlementInfo'], resolve),
            meta: {title: '结算单详情', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/deliverOrderInfo',
            name: 'deliverOrderInfo',
            component: resolve => require(['@/views/deliver/deliverOrderInfo'], resolve),
            meta: {title: '物流审核', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/deliverTxOrderInfo',
            name: 'deliverTxOrderInfo',
            component: resolve => require(['@/views/deliver/deliverTxOrderInfo'], resolve),
            meta: {title: '桐鑫物流审核', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/deliverRcOrderInfo',
            name: 'deliverRcOrderInfo',
            component: resolve => require(['@/views/deliver/deliverRcOrderInfo'], resolve),
            meta: {title: '日程物流审核', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/addPickUp',
            name: 'addPickUp',
            component: resolve => require(['@/views/deliver/addPickUp'], resolve),
            meta: {title: '新增提货单', hidden: true},
            hidden: true
        },
        {
            path: '/deliver/pickUpInfo',
            name: 'pickUpInfo',
            component: resolve => require(['@/views/deliver/pickUpInfo'], resolve),
            meta: {title: '提货单详情', hidden: true},
            hidden: true
        },
        {
          path: '/deliver/dischargingInfo',
          name: 'dischargingInfo',
          component: resolve => require(['@/views/deliver/dischargingInfo'], resolve),
          meta: {title: '排货详情',  hidden: true},
          hidden: true
        },
      ]
   },
   {
    path: "/goods",
    component: Layout,
    redirect:'/goods/goodsInformation',
    meta: { title: "商品", icon: "product" },
    children: [
      {
        path: "/goods/goodsInformation/:type",
        name: "goodsInformation",
        component: resolve =>require(["@/views/allInLine/goods/goodsInformation"], resolve),
        meta: { title: "商品资料", icon: "product-list" }
      },
      {
        path: "/goods/warehouse/:type",
        name: "warehouse",
        component: resolve => require(["@/views/allInLine/goods/warehouse"], resolve),
        meta: { title: "仓库管理", icon: "product-list" }
      }
    ]
  },
    {
      path: '/accounting',
      component: Layout,
      redirect: '/accounting/home',
      meta: {title: '财务', icon: 'sms-coupon'},
      children: [
      {
        path: '/accounting/home',
        name: 'accounting',
        component: resolve => require(['@/views/accounting/index'], resolve),
        meta: {title: '销售合同列表', icon: 'product-list',},
      },
      {
         path: '/accounting/purchaseContractDetails',
         name: 'accountPurchaseContractDetails',
         component: resolve => require(['@/views/accounting/purchaseContractDetails'], resolve),
         meta: {title: '销售合同明细', icon: 'product-list',},
      },
      {
        path: '/accounting/receiptList',
        name: 'receiptList',
        component: resolve => require(['@/views/accounting/receiptList'], resolve),
        meta: {title: '收款单',icon: 'product-list', },
      },
      {
        path: '/accounting/deliverDetailsReport',
        name: 'deliverDetailsReport',
        component: resolve => require(['@/views/accounting/deliverDetailsReport'], resolve),
        meta: {title: '发货单明细',icon: 'product-list', },
      },
      {
          path: '/accounting/freightSettlement',
          name: 'freightSettlement',
          component: resolve => require(['@/views/accounting/freightSettlement'], resolve),
          meta: {title: '运费结算',icon: 'product-list', },
      },
      {
          path: '/accounting/invoiceList',
          name: 'invoiceList',
          component: resolve => require(['@/views/accounting/invoiceList'], resolve),
          meta: {title: '发票管理',icon: 'product-list', },
      },
      {
          path: '/accounting/consultationList',
          name: 'consultationList',
          component: resolve => require(['@/views/accounting/consultationList'], resolve),
          meta: {title: '杂费(装卸费)管理',icon: 'product-list', },
      },
      {
          path: '/accounting/purchaseAccounting',
          name: 'purchaseAccounting',
          component: resolve => require(['@/views/accounting/purchaseAccounting'], resolve),
          meta: {title: '采购合同',icon: 'product-list', },
      },
      {
          path: '/accounting/contractDetailed',
          name: 'purchaseDetailedAccounting',
          component: resolve => require(['@/views/accounting/contractDetailed'], resolve),
          meta: {title: '采购合同明细',icon: 'product-list', },
      },
      {
        path: '/accounting/purchaseList',
        name: 'purchaseList',
        component: resolve => require(['@/views/accounting/purchaseList'], resolve),
        meta: {title: '采购合同付款', icon: 'product-list',},
      },
      {
        path: '/accounting/customerInvoice',
        name: 'customerInvoice',
        component: resolve => require(['@/views/accounting/customerInvoice'], resolve),
        meta: {title: '客户商品开票', icon: 'product-list',},
      },
      {
        path: '/accounting/checkInvoiceQuery',
        name: 'checkInvoiceQuery',
        component: resolve => require(['@/views/accounting/checkInvoiceQuery'], resolve),
        meta: {title: '核销单查询', icon: 'product-list',},
      },
      {
        path: '/accounting/capitalCost',
        name: 'capitalCost',
        component: resolve => require(['@/views/accounting/capitalCost'], resolve),
        meta: {title: '资金成本', icon: 'product-list',},
      },

      {
        path: '/accounting/costDetails',
        name: 'costDetails',
        component: resolve => require(['@/views/accounting/costDetails'], resolve),
        meta: {title: '成本明细', icon: 'product-list',},
      },
     {
        path: '/accounting/capitalCostNew',
        name: 'capitalCostNew',
        component: resolve => require(['@/views/accounting/capitalCostNew'], resolve),
        meta: {title: '资金成本新', icon: 'product-list',},
      },
      {
        path: '/accounting/luxiCapitalCost',
        name: 'luxiCapitalCost',
        component: resolve => require(['@/views/accounting/luxiCapitalCost'], resolve),
        meta: {title: '鲁西资金成本', icon: 'product-list',},
      },
      {
        path: '/accounting/defaultCountList',
        name: 'defaultCountList',
        component: resolve => require(['@/views/accounting/defaultCountList'], resolve),
        meta: {title: '客户违约统计', icon: 'product-list',},
      },
      {
        path: '/accounting/deliverDelayFundOrder',
        name: 'deliverDelayFundOrder',
        component: resolve => require(['@/views/accounting/deliverDelayFundOrder'], resolve),
        meta: {title: '发货延迟基金', icon: 'product-list',},
      },
      {
        path: '/accounting/financeDeliverInvoiceUrgency',
        name: 'financeDeliverInvoiceUrgency',
        component: resolve => require(['@/views/accounting/financeDeliverInvoiceUrgency'], resolve),
        meta: {title: '发货开票缓急表', icon:'product-list',},
      },
      {
        path: '/accounting/financePurchaseAfterSettlement',
        name: 'financePurchaseAfterSettlement',
        component: resolve => require(['@/views/accounting/financePurchaseAfterSettlement'], resolve),
        meta: {title: '采购后结算申请', icon:'product-list',},
      },
      {
        path: '/accounting/procurementInventory',
        name: 'procurementInventory',
        component: resolve => require(['@/views/accounting/procurementInventory'], resolve),
        meta: {title: '财务采购盘点表', icon:'product-list',},
      },
      {
          path: '/accounting/addSettlement',
          name: 'addSettlement',
          component: resolve => require(['@/views/accounting/addSettlement'], resolve),
          meta: {title: '新增结算单', hidden: true},
          hidden: true
      },
      {
          path: '/accounting/settlementInfo',
          name: 'settlementInfo',
          component: resolve => require(['@/views/accounting/settlementInfo'], resolve),
          meta: {title: '结算单详情', hidden: true},
          hidden: true
      },
      {
          path: '/accounting/purchaseApplyInfo',
          name: 'purchaseApplyInfo',
          component: resolve => require(['@/views/accounting/purchaseApplyInfo'], resolve),
          meta: {title: '付款单详情', hidden: true},
          hidden: true
      },
     ]
    },
   {
    path: '/report',
    component: Layout,
    redirect: '/report/purchaseDetailReport',
    meta: {title: 'CRM报表', icon: 'total-week'},
    children: [
      {
        path: '/report/inquiryAnalysis',
        name: 'inquiryAnalysis',
        component: resolve => require(['@/views/inquiryAnalysis'], resolve),
        meta: {title: '销售询盘分析', icon: 'addgenjin',}
      },
      {
      path: '/report/purchaseDetailReport',
      name: 'purchaseDetailReport',
      component: resolve => require(['@/views/purchaseReport'], resolve),
      meta: {title: '采购订单明细', icon: 'addgenjin',}
      },
      {
      path: '/report/saleDetailReport',
      name: 'saleDetailReport',
      component: resolve => require(['@/views/saleReport'], resolve),
      meta: {title: '销售订单明细', icon: 'addgenjin'},
      },
      {
        path: '/report/saleProfitReport',
        name: 'saleProfitReport',
        component: resolve => require(['@/views/saleProfitReport'], resolve),
        meta: {title: '销售订单执行表', icon: 'addgenjin'},
      },
      {
        path: '/report/customerProductAnalysis',
        name: 'customerProductAnalysis',
        component: resolve => require(['@/views/customerProductAnalysis'], resolve),
        meta: {title: '客户产品分析', icon: 'addgenjin'},
      },
      {
        path: '/purchase/purchaseRelationList',
        name: 'psRelationStatement',
        component: resolve => require(['@/views/purchaseRelationList'], resolve),
        meta: {title: '采销关联对账表', icon: 'addgenjin'},
      },
      {
        path: '/report/goodsAnalysis',
        name: 'goodsAnalysis',
        component: resolve => require(['@/views/goodsAnalysis'], resolve),
        meta: {title: '商品分析', icon: 'addgenjin'},
      },
      {
        path: '/report/monthAnalysis',
        name: 'monthAnalysis',
        component: resolve => require(['@/views/monthAnalysis'], resolve),
        meta: {title: '销售分析', icon: 'addgenjin'},
      },
      {
        path: '/report/customersAnalysis',
        name: 'customersAnalysis',
        component: resolve => require(['@/views/customersAnalysis'], resolve),
        meta: {title: '客户列表', icon: 'addgenjin'},
      },
      {
      path: '/report/searchStock',
      name: 'searchStock',
      component: resolve => require(['@/views/inventoryQueryReport2'], resolve),
      meta: {title: '库存查询', icon:'search',},
      },
      {
        path: '/report/customerAnalysisReport',
        name: 'customerAnalysisReport',
        component: resolve => require(['@/views/customerAnalysisReport'], resolve),
        meta: {title: '客户分析', icon:'addgenjin',},
      },
      {
        path: '/report/buyFrequencyReport',
        name: 'buyFrequencyReport',
        component: resolve => require(['@/views/buyFrequencyReport'], resolve),
        meta: {title: '客户购买频率', icon:'addgenjin',},
      },
      {
        path: '/report/saleRanking',
        name: 'saleRanking',
        component: resolve => require(['@/views/saleRanking'], resolve),
        meta: {title: '销量排行榜', icon:'addgenjin',},
      },
      {
        path: '/report/customerAnalysis',
        name: 'customerAnalysis',
        component: resolve => require(['@/views/customerAnalysis'], resolve),
        meta: {title: '客户产品线分析', icon:'addgenjin',},
      },
      {
        path: '/report/developmentProgress',
        name: 'developmentProgress',
        component: resolve => require(['@/views/developmentProgress'], resolve),
        meta: {title: '开发进度分析', icon:'addgenjin',},
      },
      {
        path: '/report/financeReport',
        name: 'financeReport',
        component: resolve => require(['@/views/financeReport'], resolve),
        meta: {title: '财务报表', icon:'addgenjin',},
      },
      {
        path: '/report/profitReport',
        name: 'profitReport',
        component: resolve => require(['@/views/profitReport'], resolve),
        meta: {title: '销售情况分析', icon:'addgenjin',},
      },
      {
        path: '/report/contractNumReport',
        name: 'contractNumReport',
        component: resolve => require(['@/views/contractNumReport'], resolve),
        meta: {title: '合同数量报表', icon:'addgenjin',},
      },
      {
        path: '/report/orderSaleProfitAnalysis',
        name: 'orderSaleProfitAnalysis',
        component: resolve => require(['@/views/orderSaleProfitAnalysis'], resolve),
        meta: {title: '订单毛利分析', icon:'addgenjin',},
      },
      {
        path: '/report/customerAnalysisInfo',
        name: 'customerAnalysisInfo',
        component: resolve => require(['@/views/customerAnalysisInfo'], resolve),
        meta: {title: '客户分析详情', hidden: true},
        hidden: true
      },
      {
        path: '/report/buyFrequencyInfo',
        name: 'buyFrequencyInfo',
        component: resolve => require(['@/views/buyFrequencyInfo'], resolve),
        meta: {title: '客户购买明细', hidden: true},
        hidden: true
      },
    ]
   },
    {
      path: "/allLineReport",
      component: Layout,
      name: "allLineReport",
      meta: { title: "全流程报表", icon: "total-week" },
      children: [
        {
          path: "/allLineReport/warehouseReport",
          name: "warehouseReport",
          component: resolve =>require(["@/views/allInLine/report/warehouseReport"], resolve),
          meta: { title: "仓库报表", icon: "product-list" }
        },
        {
          path: "/allLineReport/allLineInquiryReport",
          name: "allLineInquiryReport",
          component: resolve =>require(["@/views/allInLine/report/allLineInquiryReport"], resolve),
          meta: { title: "询价统计", icon: "product-list" }
        },
        {
          path: "/allLineReport/settleReport",
          name: "settleReport",
          component: resolve =>require(["@/views/allInLine/report/settleReport"], resolve),
          meta: { title: "成交统计", icon: "product-list" }
        },
        {
          path: "/allLineReport/unsettleReport",
          name: "unsettleReport",
          component: resolve =>require(["@/views/allInLine/report/unsettleReport"], resolve),
          meta: { title: "未成交统计", icon: "product-list" }
        },
        {
          path: "/allLineReport/purchaseTimeReport",
          name: "purchaseTimeReport",
          component: resolve =>require(["@/views/allInLine/report/purchaseTimeReport"], resolve),
          meta: { title: "采购时长分析", icon: "product-list" }
        },
        {
          path: "/allLineReport/logisticsTimeReport",
          name: "logisticsTimeReport",
          component: resolve =>require(["@/views/allInLine/report/logisticsTimeReport"], resolve),
          meta: { title: "物流时长分析", icon: "product-list" }
        },
        {
          path: "/allLineReport/truckRatioReport",
          name: "truckRatioReport",
          component: resolve =>require(["@/views/allInLine/report/truckRatioReport"], resolve),
          meta: { title: "整车占比", icon: "product-list" }
        },
        {
          path: "/allLineReport/deliOvertimeReport",
          name: "deliOvertimeReport",
          component: resolve =>require(["@/views/allInLine/report/deliOvertimeReport"], resolve),
          meta: { title: "发货超时分析", icon: "product-list" }
        },
        {
          path: "/allLineReport/inquiryVolReport",
          name: "inquiryVolReport",
          component: resolve =>
            require(["@/views/allInLine/report/inquiryVolReport"], resolve),
          meta: { title: "询价交期分析", icon: "product-list" }
        },
        {
          path: "/allLineReport/orderVolReport",
          name: "orderVolReport",
          component: resolve =>
            require(["@/views/allInLine/report/orderVolReport"], resolve),
          meta: { title: "订单交期分析", icon: "product-list" }
        },
      ]
    },
  {
    path: '/inquiry',
    component: Layout,
    redirect: '/inquiry/inquiryList',
    meta: {title: '询价', icon: 'total-today'},
    children: [{
      path: '/inquiry/inquiryList',
      name: 'inquiryList',
      component: resolve => require(['@/views/inquiry/inquiryList'], resolve),
      meta: {title: '销售询价', icon: 'addgenjin',}
    },
    {
      path: '/inquiry/inquiryPumsList',
      name: 'inquiryPumsList',
      component: resolve => require(['@/views/inquiry/inquiryPumsList'], resolve),
      meta: {title: '采购报价', icon: 'addgenjin',}
      },
      {
      path: '/inquiry/inquiryGoodsSourceList',
      name: 'inquiryGoodsSourceList',
      component: resolve => require(['@/views/inquiry/inquiryGoodsSourceList'], resolve),
      meta: {title: '采购货源报价', icon: 'addgenjin',}
      },
      {
      path: '/inquiry/inquirySetting',
      name: 'inquirySetting',
      component: resolve => require(['@/views/inquiry/inquirySetting'], resolve),
      meta: {title: '询价设置', icon: 'addgenjin',}
      },
      {
      path: '/inquiry/inquiryStatistics',
      name: 'inquiryStatistics',
      component: resolve => require(['@/views/inquiry/inquiryStatistics'], resolve),
      meta: {title: '询价统计', icon: 'addgenjin',}
      },
    ]
  },
  {
    path: '/logistics',
    component: Layout,
    redirect: '/logistics/checkFreight',
    meta: {title: '物流', icon: 'logistics'},
    children: [
      {
      path: '/logistics/checkFreight',
      name: 'checkFreight',
      component: resolve => require(['@/views/logistics/checkFreight'], resolve),
      meta: {title: '查运费', icon: 'addgenjin',}
    },{
      path: '/logistics/checkRecord',
      name: 'checkRecord',
      component: resolve => require(['@/views/logistics/checkRecord'], resolve),
      meta: {title: '查记录', icon: 'addgenjin',}
      },
    ]
  },
  {
    path: '/personnel',
    component: Layout,
    redirect: '/personnel/employeeFiles',
    name: 'personnel',
    meta: {title: '行政', icon: 'user'},
    children: [
      {
        path: '/personnel/employeeList',
        name: 'employeeList',
        component: resolve => require(['@/views/personnel/employeeList'],resolve),
        meta: {title: '员工花名册', icon: 'employeeSetting'},
      },
      {
        path: '/personnel/employeeFiles',
        name: 'employeeFiles',
        component: resolve => require(['@/views/personnel/employeeFiles'],resolve),
        meta: {title: '员工档案', icon: 'employeeSetting'},
      },
      {
        path: '/personnel/rewardsPunishmentsRecords',
        name: 'rewardsPunishmentsRecords',
        component: resolve => require(['@/views/personnel/rewardsPunishmentsRecords'],resolve),
        meta: {title: '奖惩记录', icon: 'employeeSetting'},
      },
      {
        path: '/personnel/contractRecords',
        name: 'contractRecords',
        component: resolve => require(['@/views/personnel/contractRecords'],resolve),
        meta: {title: '合同记录', icon: 'employeeSetting'},
      },
      {
        path: '/personnel/communicationRecords',
        name: 'communicationRecords',
        component: resolve => require(['@/views/personnel/communicationRecords'],resolve),
        meta: {title: '沟通记录', icon: 'employeeSetting'},
      },
      {
        path: '/personnel/trainingRecords',
        name: 'trainingRecords',
        component: resolve => require(['@/views/personnel/trainingRecords'],resolve),
        meta: {title: '培训记录', icon: 'employeeSetting'},
      },
      {
        path: '/personnel/employeeInfo',
        name: 'employeeInfo',
        component: resolve => require(['@/views/personnel/employeeInfo'],resolve),
        meta: {title: '员工详情', hidden: true},
        hidden: true
      },
    ]
  },
  {
    path: "/screen",
    component: Layout2,
    name: "screen",
    meta: { title: "大屏", icon: "product-list" },
    children: [
      {
        path: "/screen/bigScreen",
        name: "bigScreen",
        component: resolve =>require(["@/views/allInLine/screen/bigScreen"], resolve),
        meta: { title: "数据大屏", icon: "product-list" }
      },
      {
        path: "/screen/rankingList",
        name: "rankingList",
        component: resolve =>require(["@/views/allInLine/screen/rankingList"], resolve),
        meta: { title: "排行榜", icon: "product-list" }
      },
    ]
  },
  {path: '*', redirect: '/index', hidden: true}
];

let newRoutes = constantRouterMap;

export default new Router({
  // mode: 'history', //后端支持可开
  scrollBehavior: () => ({y: 0}),
  routes: constantRouterMap
})

